Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-6799] Improve metadata performance with async file I/O #1133

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

nickdowell
Copy link
Contributor

Goal

To reduce the overhead of adding metadata by performing filesystem I/O on a background queue.

Changeset

Metadata is now serialized to a JSON encoded C string in memory that is read at crash time.

File writing now occurs asynchronously on a dedicated serial dispatch_queue to free up the calling thread and avoid provoking filesystem contention.

Storage for the isLaunching property now goes through the KV-store (on the main thread) so that it can be accurately read at next start-up in the event of a crash (to compute lastRunInfo)

Testing

A unit test case has been added to verify that interrupted metadata updates do not result in invalid JSON being added to crash reports.

Ran successful full E2E on CI

@nickdowell nickdowell requested review from kstenerud and kattrali June 24, 2021 14:51
@github-actions
Copy link

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size increased by 1,744 bytes from 1,130,600 to 1,132,344

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants